fix(server-utils): Ensure all orchestrion instrumentation lazy registers#22387
fix(server-utils): Ensure all orchestrion instrumentation lazy registers#22387mydea wants to merge 2 commits into
Conversation
size-limit report 📦
|
d3bf68e to
8e918d3
Compare
timfish
left a comment
There was a problem hiding this comment.
I can't find where invokeOrchestrionInstrumentation is defined 🤔
This is in the other PR in this stack: #22386 |
8e918d3 to
03b2355
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 03b2355. Configure here.
1ba8963 to
3e8c1ea
Compare
03b2355 to
93dba1a
Compare
| functionQuery: { expressionName: 'query', kind: 'Auto' }, | ||
| }, | ||
| ] satisfies InstrumentationConfig[]; | ||
| ] as const satisfies InstrumentationConfig[]; |
There was a problem hiding this comment.
q: Why was this cast necessary everywhere?

Migrates all orchestrion tracing-channel integrations to the
invokeOrchestrionInstrumentationhelper so that every integration lazily registers its channel subscribers only once the corresponding module is actually injected, rather than registering eagerly atSentry.init().Previously each integration wired up its own diagnostics-channel subscription directly, which meant subscribers could be registered before (or without) the target module ever being loaded, and the timing was inconsistent across integrations. Routing everything through the shared helper makes the behavior uniform: subscribers are set up for build-time-injected modules immediately and for runtime-injected modules when injection happens, always before the module publishes, and never more than once.
Alongside the migration, several integrations (hapi, graphql, kafkajs) are restructured into a
<name>/index.ts+<name>/instrumentation.tslayout to match the existing convention and keep the instrumentation wiring separate from the integration definition.Stacked on top of #22386 (ensure injected modules can reliably be picked up).